home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1986 July / Ahoy_Magazine_86-07_1986_Double_L.d64 / disk editor.txt < prev    next >
Text File  |  2022-10-26  |  3KB  |  88 lines

  1. Disk Editor
  2. by Ian MacPhedran
  3.  
  4. This handy utility edits blocks on a
  5. Commodore disk drive (unit 8, drive
  6. 0) from a Commodore 64 computer. I
  7. wrote the program to become more
  8. familiar with the COMAL language, and
  9. I was impressed by the ease of
  10. program flow given by the structured
  11. programming statements. However, I
  12. did note the lack of certain features
  13. in version 0.14. The foremost of
  14. these is the lack of a GET statement
  15. to GET a byte from the disk. However,
  16. the DISK'GET function from
  17. DISK'GET/DEMO on the SAMPLER disk
  18. does fill this need. Also, the STR$
  19. function, while important in many
  20. applications, is not available in
  21. COMAL 0.14, but is easy to program
  22. [Ed note: STR$ and GET$ are built
  23. into COMAL 2.0].
  24.  
  25. The program displays a menu of 5
  26. options on the screen. Type the
  27. letter next to an option to choose
  28. that portion of the program, as
  29. follows.
  30.  
  31. Option A: allows you to read a block
  32. from the disk. You will be asked for
  33. the track and sector of the block,
  34. and after reading, the disk status
  35. will be displayed, along with a
  36. request to press a key to return to
  37. the menu. To see the contents of this
  38. block use option C.
  39.  
  40. Option B: allows you to write an
  41. edited block back to the disk. Be
  42. Careful! Check the block contents
  43. over before writing to make sure that
  44. the changes you have made are the
  45. ones you wanted to make. To be safe,
  46. don't write a block back to disk if
  47. no changes have been made. When
  48. writing, you will again be asked for
  49. track and sector to write to. This
  50. will enable you to write to a block
  51. other than the one read from.
  52.  
  53. Option C: allows you to look at and
  54. edit half of the block read in with
  55. option A. You will be asked whether
  56. you wish to see the first or second
  57. half of the block (both won't fit on
  58. one screen), and then that portion is
  59. displayed on the screen. The bottom
  60. line asks you either to edit a line
  61. or press return to return to menu. To
  62. edit a line, move the cursor up and
  63. over to the HEX numbers you wish to
  64. change, make the changes required,
  65. and press return. Edit one line at a
  66. time. Note that you should redisplay
  67. the block after editing (i.e., return
  68. to menu and then choose C again) to
  69. check the changes, as the display is
  70. not refreshed after an edit. To
  71. return to the menu press return
  72. without moving the cursor.
  73.  
  74. Option D: allows you to send commands
  75. to the disk and read the error
  76. channel. This is helpful if you wish
  77. to edit a block, and then allacate it
  78. on the BAM, or if you wish to
  79. VALIDATE or NEW a disk.
  80.  
  81. Option E: will exit the program and
  82. return you to COMAL.
  83.  
  84. This program and its variables take
  85. up about half of the available
  86. memory, so small additions can still
  87. be made to it.
  88.